package org.vectrics.recruiter.struts.tag;

/**
 * @author Mike Moore
 * @version 1.0
 */
import java.util.Properties;

import org.vectrics.provider.CoreServiceLocator;
import org.vectrics.user.Person;
import org.vectrics.user.User;
import org.vectrics.user.UserGroup;
import org.vectrics.DataException;
import org.apache.log4j.*;
import javax.servlet.http.HttpServletRequest;

public class RecruitAdminUserEditTag extends AdminUserEditTag {

	private static final long serialVersionUID = 6459436987505878822L;
	
	static private Category log = Category.getInstance(RecruitAdminUserEditTag.class);
    private Properties roles = new Properties();
    
    
	protected String getFormAction(HttpServletRequest request) {
		return(request.getContextPath() + "/admin/user/save.do");
	}
    
    
    public RecruitAdminUserEditTag() {
        roles.setProperty("recruit-admin", "Administrator");
        roles.setProperty("recruit-employee", "Support Employee");
        roles.setProperty("recruit-candidate", "Candidate");
        roles.setProperty("recruit-mgr", "Manager");
    }

    protected boolean isUserInGroup(Person person, UserGroup userGroup) {
        return(true);
    }
    
    
    protected User findUser(Long userId) throws DataException {
        return(CoreServiceLocator.getPersonService().findUserById(userId));
    }
/*
    protected Collection getUserGroupList() {
        return(RecruitStart.getInstance().getUserGroups());
    }
*/
    
}
